using System;
using System.Runtime.InteropServices;

namespace WindowsAPI
{
    [StructLayout(LayoutKind.Sequential)]
    public struct ProcessEntry32
    {
        public static ProcessEntry32 Default { get { return new ProcessEntry32 { dwSize = (UInt32)Marshal.SizeOf(typeof(ProcessEntry32)) }; } }

        public uint dwSize;
        public uint cntUsage;
        public uint th32ProcessID;
        public IntPtr th32DefaultHeapID;
        public uint th32ModuleID;
        public uint cntThreads;
        public uint th32ParentProcessID;
        public int pcPriClassBase;
        public uint dwFlags;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
        public string szExeFile;
    };
}